<?php
use Workerman\Worker;

require_once __DIR__."/../Autoloader.php";

$json_work = new Worker("JsonSL://0.0.0.0:1234");
$json_work->onMessage = function($connection,$data){
   #返回客户端处理后的数据
    echo $data;
    #发送时自动调用
    $connection->send(["code"=>0,"msg"=>"frist 协议"]);
};

Worker::runAll();